#pragma once
#include <windows.h>
#include <xnamath.h>

enum AXIS{
	AXIS_X,
	AXIS_Y,
	AXIS_Z,
	AXIS_NUM,
};

struct Camera{
	Camera(){}
	Camera(
		const XMFLOAT3& position, 
		const XMFLOAT3& target, 
		const XMFLOAT3& up, 
		float fov = XM_PIDIV2,
		float nearClip = 0.001f,
		float farClip = 100.f
	);

	const XMMATRIX& GetView()const{ return view; }
	const XMMATRIX& GetProj()const{ return proj; }
	void Rotate(AXIS axis, float angle);
	void Move(AXIS axis, float distance);
	void Update();
	void SetAspect(float aspect){this->aspect = aspect;}
private:

	XMVECTOR pos, dirs[3];
	float fov, aspect, nearClip, farClip;

	XMMATRIX view, proj;
};